const tabbarList = [{
		name: '全部订单',
		status: 0,
		type: 'HOLD'
	},
	{
		name: '待观影',
		status: 3,
		type: 'USED'
	}
]

const orderStatus = [{
		id: 0,
		name: '已提交',
		color: '#FF8600'
	},
	{
		id: 1,
		name: '已确认',
		color: '#FF8600'
	},
	{
		id: 2,
		name: '已出票',
		color: '#FF8600'
	},
	{
		id: 3,
		name: '已完成',
		color: '#FF8600'
	},
	{
		id: 4,
		name: '已取消',
		color: '#d63a3a'
	},
	{
		id: 5,
		name: '已退款',
		color: '#d63a3a'
	}
];
const timers = 15 * 60 * 1000
export default {
	getTabbarList() {
		return tabbarList;
	},
	getStatus(e) {
		let startDate = new Date(e.startTime)
		let nowDate = new Date()
		if (e.orderStatus == 2 && nowDate.getTime() > startDate.getTime() + timers) {
			return {
				name: '已完成',
				color: '#FF8600'
			}
		}
		return orderStatus[e.orderStatus]
	}
}